import java.util.Locale;

public class test1 {
    public static boolean select(char s){
        if((s >= 'a' && s <= 'z')||(s >= '0' && s <= '9')){
            return true;
        }
        return false;
    }
    public static void main(String[] args) {
        String str1 = "A man, a plan, a canal: Panama";
        String str2 = str1.toLowerCase();
        int left = 0;
        int right = str2.length() - 1;
        while(left < right){
            while(left < right && !select(str2.charAt(left))){
                left++;
            }
            while(left < right && !select(str2.charAt(right))){
                right--;
            }
            if (left < right){
                if(str2.charAt(left) == str2.charAt(right)){
                    left++;
                    right--;
            } else {
                    System.out.println("否");
                    break;
                }
            }
        }
        if(left >= right){
            System.out.println("是");
        }
    }
}